#ifndef _SBIGNUM_H
#define _SBIGNUM_H

#include <stdint.h>
#include "bignum.h"

// 有符号大数，neg=0表示正数，neg!=0表示负数
typedef struct {
    bignum_t num;
    int neg;
} sbignum_t;

void sbignum_free(sbignum_t* num);
int sbignum_compare(sbignum_t* a, sbignum_t* b);
void sbignum_cpy(sbignum_t* a, sbignum_t* b);
void sbignum_add(sbignum_t* p, sbignum_t* q, sbignum_t* res);
void sbignum_sub(sbignum_t* a, sbignum_t* b, sbignum_t* res);
void sbignum_mul(sbignum_t* p, sbignum_t* q, sbignum_t* res);

#endif
